﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="VehicleModelManagement.aspx.cs" Inherits="NetDon.OA.Portal.Admin.VehicleModelManagement" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script language="javascript" type="text/javascript">

        function OpenEditPage(strOID) {
            $dialog('<%=ResolveUrl( "~/Admin/VehicleModelEdit.aspx")%>?OID=' + strOID, { width: 340, height: 150 }, function (result) {
                if (result) {
                    $get('<%=btnRefresh.ClientID %>').click();
                }
            });
        }

        function OpenEditPageNew() {
            $dialog('<%=ResolveUrl( "~/Admin/VehicleModelEdit.aspx")%>', { width: 340, height: 150 }, function (result) {
                if (result) {
                    $get('<%=btnRefresh.ClientID %>').click();
                }
            });
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="float: left; margin-left: 10px;">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <NetDon:GridView ID="gridCurrency" runat="server" OnRowDataBound="gridItem_RowDataBound"
                                AutoGenerateColumns="false" OnRowCommand="gridItem_RowCommand">
                                <Columns>
                                    <NetDon:BoundField HeaderText="车型" DataField="ModelName" HtmlEncode="true">
                                    </NetDon:BoundField>
                                    <NetDon:BoundField HeaderText="长(米)" DataField="Length"  DataFormatString="{0:#,###.000}" HtmlEncode="true">
                                    </NetDon:BoundField>
                                    <NetDon:BoundField HeaderText="宽(厘)" DataField="Width"  DataFormatString="{0:#,###.000}" HtmlEncode="true">
                                    </NetDon:BoundField>
                                      <NetDon:BoundField HeaderText="高(米)" DataField="Height"  DataFormatString="{0:#,###.000}" HtmlEncode="true">
                                    </NetDon:BoundField>
                                    <NetDon:TemplateField HeaderText="操作">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="btnDelete" runat="server" SkinID="Delete" CommandName="DeleteItem"
                                                CommandArgument='<%#Eval("Id") %>' CausesValidation="false" />&nbsp;&nbsp;<asp:ImageButton
                                                    ID="btnModify" SkinID="Modify" runat="server" CausesValidation="false" />
                                            <NetDon:ConfirmButtonExtender runat="server" TargetControlID="btnDelete" 
                                                ConfirmText="确认删除？" ID="ctl01" Enabled="True">
                                            </NetDon:ConfirmButtonExtender>
                                        </ItemTemplate>
                                    </NetDon:TemplateField>
                                </Columns>
                            </NetDon:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div style="margin-top: 10px;">
                                <asp:Button ID="btnAddItem" runat="server" 
                                    Text="新增" 
                                    OnClientClick="OpenEditPageNew(); return false;">
                                </asp:Button>
                                <asp:Button ID="btnRefresh" runat="server" 
                                     SkinID="Hidden" 
                                    OnClick="btnRefresh_Click">
                                </asp:Button>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
